<layout name="layout" />
	<link rel="stylesheet" type="text/css" href="/public/common/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="/public/common/bootstrap/css/bootstrap.css" media="all">
	<link rel="stylesheet" type="text/css" href="/public/common/global.css">
  <link rel="stylesheet" type="text/css" href="/public/admin/css/personal.css" media="all">
</head>
<body style="background-color:#fff;">
<section class="larry-wrapper"  >
  <div class="larry-personal">
    <header class="larry-personal-tit">
      <span class="layui-btn layui-btn-big">修改用户</span>
    </header><!-- /header -->
    <div class="larry-personal-body clearfix">
      <form class="layui-form col-lg-5" name="main_form" method="POST" action="__SELF__" enctype="multipart/form-data">
        <input type="hidden"  name="id" value="<?php echo $data['id']; ?>">
        <div class="layui-form-item">
          <label class="layui-form-label">用户名</label>
          <div class="layui-input-block">
            <input type="text" name="username" value="<?php echo $data['username']; ?>" autocomplete="off"  class="layui-input xiangmu" >
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">密码</label>
          <div class="layui-input-block">
            <input type="password" name="password" value="<?php echo $data['password']; ?>" autocomplete="off" class="layui-input"  >
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">重复密码</label>
          <div class="layui-input-block">
           <input class="layui-input" type="password" name="repassword"  autocomplete="off" v-model="passRe"  @change="fun()">
					 <div class="layui-form-mid layui-word-aux" v-show="ok" style="color:red;">重复密码错误</div>
          </div>
        </div>

        <div class="layui-form-item">
          <label class="layui-form-label">联系人电话</label>
          <div class="layui-input-block">
            <input type="text"  name="mobile" value="<?php echo $data['mobile']; ?>"  autocomplete="off" class="layui-input"  >
          </div>
        </div>
				<div class="layui-form-item">
	          <label class="layui-form-label">绑定项目</label>
	          <div class="layui-input-block">
              <?php foreach ($project as $key => $value) :
               
              ?>
							<input type="checkbox" name="project_id[]"  value="<?php echo $value['id']; ?>" title="<?php echo $value['project_name']; ?>" lay-skin="primary" >
							<?php endforeach; ?>
	          </div>
	      </div>
        <div class="layui-form-item">
          <div class="layui-input-block">
            <input type="submit" class="layui-btn" v-bind:class="{'layui-btn-disabled':isactive}" lay-submit lay-filter="demo1" value=" 立即提交 " />
            <input type="reset" class="layui-btn layui-btn-primary" value=" 重置 " />
          </div>
        </div>
      </form>

    </div>
  </div>
	<!-- <blockquote class="layui-elem-quote layui-quote-nm " v-show="ok">密码重复错误</blockquote> -->
		<!-- <p class="bg-danger" 	>重复密码有错误</p> -->
</section>

<script type="text/javascript" src="/public/common/layui/layui.js"></script>
<script type="text/javascript" src="/public/admin/js/vue.js"></script>
<script src="/public/admin/js/vue.js"></script>
<script type="text/javascript">
layui.use('form',function(){
  var form = layui.form();
	form.on('submit(formDemo)', function(data){
	layer.msg(JSON.stringify(data.field));
	return false;
});
})
new Vue({
		data:{
			pass:'',
			passRe:'',
			ok:false,
			isactive:false
		},
		methods:{
			fun:function(){
				if(this.pass === this.passRe){
					this.isactive = false
					this.ok = false
				}else{
					this.ok =true
					this.isactive = true
				}
			}
		}
}).$mount('.larry-wrapper')
</script>
</body>
</html>
